File Exist
AutomatR.SFTP.FileExist
The "File Exist" activity in AutomatR is part of the SFTP activities package, providing the capability to check whether a specific file exists in the specified SFTP directory. This activity is useful for validating the presence of a file before performing subsequent actions in the automation workflow.
Properties
Name | Description |
---|---|
Input | |
Client | Specifies the SFTP client object to connect to the SFTP server. |
Server File Path | Specifies the SFTP directory path to check whether the specified file exists. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the activity. Useful for handling synchronization issues. |
Output | |
Result | Outputs a boolean variable indicating whether the specified file was located (true) or not (false). |
How to use:
- Drag and drop the "File Exist" activity onto the workflow.
- Configure the properties by specifying the SFTP client, server file path, and optionally set a delay.
- Execute the workflow to check whether the specified file exists in the SFTP directory.
- Utilize the boolean output variable "Result" for conditional branching or further actions based on the file's existence.
Example:
Consider an example where the "File Exist" activity is used to check whether a file named "document.txt" exists in the "/Documents/" directory on the SFTP server:
File Exist:
Display Name: "Check Document Existence"
Client: sftpClientObject
Server File Path: "/Documents/document.txt"
Result: isFileExists
In this example, the activity checks whether the file "document.txt" exists in the "/Documents/" directory on the SFTP server. The boolean result is stored in the variable "isFileExists" for further workflow decision-making.